package com.zh.harmony.butterknife.slice;

import com.zh.harmony.butterknife.annotations.Bind;
import com.zh.harmony.butterknife.ButterKnife;
import com.zh.harmony.butterknife.annotations.OnClick;
import com.zh.harmony.butterknife.ResourceTable;
import com.zh.harmony.butterknife.util.ToastUtil;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.agp.components.Button;

public class ListAbilitySlice extends AbilitySlice {
    @Bind(ResourceTable.Id_back)
    Button vBack;

    @Override
    protected void onStart(Intent intent) {
        super.onStart(intent);
        setUIContent(ResourceTable.Layout_slice_list);
        ButterKnife.inject(this);
        if (intent != null) {
            String data = intent.getStringParam("data");
            ToastUtil.toast(this, data);
        }
    }

    @OnClick(values = {ResourceTable.Id_back})
    void onBack() {
        terminate();
    }
}
